package services;

import dao.IInventory;
import factory.InventoryDaoFactory;
import vo.Contract;
import vo.Inventory;

import java.util.List;

public class InventoeyServicempl implements IInventoeyService{
    IInventory iInventorynventory= InventoryDaoFactory.getInstance();//获取对应的(客户操作类)接口对象,向上转型
    @Override
    public boolean add(Inventory inventory) {
        return iInventorynventory.add(inventory);
    }

    @Override
    public boolean delete(Inventory inventory) {
        return iInventorynventory.delete(inventory);
    }

    @Override
    public boolean modify(Inventory inventory) {
        return iInventorynventory.modify(inventory);
    }

    @Override
    public Inventory getcustombyid(int id) {
        return iInventorynventory.getcustombyid(id);
    }

    @Override
    public List<Inventory> getall() {
        return iInventorynventory.getall();
    }
}
